﻿using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;

using Styx;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Plugins.PluginClass;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;

namespace DbFirstAid
{
    public partial class DBFirstAidConfig : Form
    {


        public DBFirstAidConfig()
        {
            InitializeComponent();

            numericUpDown1.Value = Decimal.Parse(DBFirstAid.config.useBandage.ToString());

            linenCombo.Text =DBFirstAid.config.linenBandage;
            woolenCombo.Text = DBFirstAid.config.woolenBandage;
            silkCombo.Text = DBFirstAid.config.silkBandage;
            mageCombo.Text = DBFirstAid.config.mageBandage;
            runeCombo.Text = DBFirstAid.config.runeBandage;
            netherCombo.Text = DBFirstAid.config.netherBandage;
            frostCombo.Text = DBFirstAid.config.frostBandage;
            emberCombo.Text = DBFirstAid.config.emberBandage;
        
        
        }

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.useBandage = int.Parse(((NumericUpDown)sender).Value.ToString());
        }

        private void linenCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.linenBandage = ((ComboBox)sender).Text;
        }

        private void woolenCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.woolenBandage = ((ComboBox)sender).Text;
        }

        private void silkCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.silkBandage = ((ComboBox)sender).Text;
        }

        private void mageCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.mageBandage = ((ComboBox)sender).Text;
        }

        private void runeCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.runeBandage = ((ComboBox)sender).Text;
        }

        private void netherCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.netherBandage = ((ComboBox)sender).Text;
        }

        private void frostCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.frostBandage = ((ComboBox)sender).Text;
        }

        private void emberCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            DBFirstAid.config.emberBandage = ((ComboBox)sender).Text;
        }

        private void DBFirstAidConfig_FormClosing(object sender, FormClosingEventArgs e)
        {
            DBFirstAid.config.Save();
        }

        private void DBFirstAidConfig_Shown(object sender, EventArgs e)
        {

        }


    }
}
